//
//  AppDelegate.h
//  SIPphone
//
//  Created by wrt on 13-10-25.
//  Copyright (c) 2013年 wrtsoft. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "SoundEngine.h"
#import "SIPInterface.h"
#import "CallViewController.h"
#import "Reachability.h"


//用XMLRPC获取服务器发送过来的XML所需要的头文件
#import "XMLRPCConnectionManager.h"
#import "XMLRPCRequest.h"
#import "XMLRPCConnection.h"
#import "XMLRPCConnectionManager.h"
#import "XMLRPCResponse.h"

typedef enum _Connectivity {
	wifi,
	wwan,
    none
} Connectivity;

struct NetworkReachabilityContext {
    
//    bool_t testWifi, testWWan;
    void (*networkStateChanged) (Connectivity newConnectivity);
};

@interface AppDelegate : UIResponder <UIApplicationDelegate, SIPInterfaceListenDelegate, XMLRPCConnectionDelegate,UITabBarControllerDelegate>
{
    BOOL multitaskingSupported; //判断是否支持多线程
//    CLLocationManager *locManager; //地图监听
@protected
	SCNetworkReachabilityRef proxyReachability;  //网络标识
    Connectivity connectivity;   //网络状态
    BOOL stopWaitingRegisters;
}

@property Connectivity connectivity;

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UINavigationController *navForMsg;  //用于tabbar上的信息按钮导航控件
@property (strong, nonatomic) UITabBarController *tabBarVC;  //tabbar控件
@property (assign, nonatomic) NSTimer *postTimer; //循环计时器 10秒获取一次web服务器的推送消息
@property (strong, nonatomic) NSArray *tempArray; //用于存储需要上传到web服务器的参数
@property (nonatomic) Reachability *internetReachability; //用于判断网络连接状态
@property (assign, nonatomic) int isFristOpen;   //用于判断是否是第一次登陆
@property (assign, nonatomic) int isRecodeOpenNumber;  //用于打开软件纪录的次数


@end
